package com.zhiwei.codesecurity.web.common.base;
import com.zhiwei.codesecurity.common.base.BaseEntity;
import com.zhiwei.codesecurity.common.enums.ResultCode;

public class SuccessResponse<T extends BaseEntity> extends BaseResponse {
    private static final long serialVersionUID = -7671756385477179547L;

    /**
     * api返回数据
     */
    private T data;


    public SuccessResponse() {
        super(ResultCode.SUCCESS.getKey(), ResultCode.SUCCESS.getValue());
    }

    public SuccessResponse(T data) {
        super(ResultCode.SUCCESS.getKey(), ResultCode.SUCCESS.getValue());
        this.data = data;
    }


    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
